package com.idata.model.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class DefaultImgUrlManager implements EnvironmentAware, InitializingBean {

    private Environment environment;

    public static String DEFAULT_AVATAR_IMG_URL;

    public static String DEFAULT_DISPUTE_IMG_URL;


    @Override
    public void afterPropertiesSet() throws Exception {
        DEFAULT_AVATAR_IMG_URL = environment.getProperty("default-img-url.avatar-url");
        DEFAULT_DISPUTE_IMG_URL = environment.getProperty("default-img-url.dispute-url");
    }

    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }
}